using Glue;
using Xunit;

namespace GlueTests.AutoRelaterTests
{
    public class When_overriding_autorelating_And_calling_Remove
    {
        private readonly Mapping<DomainPerson, GuiPerson> mapping;

        public class DomainPerson { public int Id { get; set; } }
        public class GuiPerson { public int Id { get; set; } }


        public When_overriding_autorelating_And_calling_Remove()
        {
            mapping = new Mapping<DomainPerson, GuiPerson>();
            mapping.AutoRelateEqualNames()
                .Remove(master => master.Id, t => t.Id);
        }

        [Fact]
        public void There_should_be_no_relation()
        {
            Assert.Equal(0, mapping.Relations.Count);
        }
    }
}